﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_newsletter_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>Kimland - Danh sách người dùng nhận bản tin</title>
    <script type="text/javascript">
        $(function () {
            $(".headerR li:eq(2)").addClass("active");
            var text=$("input[id*=hidChar]").val();
            $(".search a").removeClass("active");
            $(".search a[rel="+text+"]").addClass("active");           
        })
       
    </script>
    <style type="text/css">
        .boxMenuL:hover a,.boxMenuL.active a{color:#d80018;text-decoration:none;text-transform:uppercase;}
        .boxMenuL:hover,.boxMenuL.active{margin-bottom:5px;}
        .boxMenuL:hover .l,.boxMenuL.active .l{background:url(/images/sm_l.png) no-repeat;}
        .boxMenuL:hover .m,.boxMenuL.active .m{background:url(/images/sm_m.png) repeat-x;}
        .boxMenuL:hover .r,.boxMenuL.active .r{background:url(/images/sm_r.png) no-repeat;}
        .disable,.disable:hover{color:#000}
        .search{margin:5px 0px 10px 0px}
            .search a{font-weight:bold;} 
            .search .active{color:#000;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="body">
    <div class="bodyL">
        <p class="gOval"><a href="/admin/newsletter/default.aspx" class="newsletter"></a></p>
        <div class="menuL">
            <div class="boxMenuL active">
                <span class="l"></span><span class="m"><a href="/admin/newsletter/default.aspx">DS nhận tin</a></span><span class="r"></span>                   
            </div>               
        </div>
        <div class="menuL">
            <div class="boxMenuL">
                <span class="l"></span><span class="m"><a href="/admin/newsletter/template.aspx">Mẫu newsletter</a></span><span class="r"></span>                   
            </div>
        </div>
    </div>
           
    <div class="bodyR">
        <div class="topCatBR">
            <p class="l"></p>
            <div class="m">
                <p class="pos">
                    <a href="/admin/newsletter/default.aspx">Danh sách đăng kí nhận bản tin</a>
                </p>
            </div>            
            <p class="r"></p>
        </div>
        <div class="boxBorder" style="height:500px;min-height:500px;height:auto">
            <div class="info_div" id="fail" runat="server" visible="false">        
                <asp:Label ID="lblMessage" runat="server" Text="" CssClass="ico_cancel"></asp:Label>
            </div>
            <asp:Button ID="btnXoa" runat="server" Text="Xóa" CssClass="buttonA" OnClientClick="return doDel();" onclick="btnDel_Click"/>
            <script type="text/javascript">
                function doSearch(object, text) {
                    $(".search a").removeClass("active");
                    $(object).addClass("active");
                    $("input[id*=hidChar]").val(text);
                    $("input[id*=btnSearch]").click();
                }
            </script>
            <p class='search'>
                Tìm theo tên: 
               <a rel='a' href="javascript:void(0)" onclick="doSearch(this,'a')">A</a> | 
               <a rel='b' href="javascript:void(0)" onclick="doSearch(this,'b')">B</a> | 
               <a rel='c' href="javascript:void(0)" onclick="doSearch(this,'c')">C</a> | 
               <a rel='d' href="javascript:void(0)" onclick="doSearch(this,'d')">D</a> | 
               <a rel='e' href="javascript:void(0)" onclick="doSearch(this,'e')">E</a> | 
               <a rel='f' href="javascript:void(0)" onclick="doSearch(this,'f')">F</a> | 
               <a rel='g' href="javascript:void(0)" onclick="doSearch(this,'g')">G</a> | 
               <a rel='h' href="javascript:void(0)" onclick="doSearch(this,'h')">H</a> | 
               <a rel='i' href="javascript:void(0)" onclick="doSearch(this,'i')">I</a> | 
               <a rel='j' href="javascript:void(0)" onclick="doSearch(this,'j')">J</a> | 
               <a rel='k' href="javascript:void(0)" onclick="doSearch(this,'k')">K</a> | 
               <a rel='l' href="javascript:void(0)" onclick="doSearch(this,'l')">L</a> | 
               <a rel='m' href="javascript:void(0)" onclick="doSearch(this,'m')">M</a> | 
               <a rel='n' href="javascript:void(0)" onclick="doSearch(this,'n')">N</a> | 
               <a rel='o' href="javascript:void(0)" onclick="doSearch(this,'o')">O</a> | 
               <a rel='p' href="javascript:void(0)" onclick="doSearch(this,'p')">P</a> | 
               <a rel='q' href="javascript:void(0)" onclick="doSearch(this,'q')">Q</a> | 
               <a rel='r' href="javascript:void(0)" onclick="doSearch(this,'r')">R</a> | 
               <a rel='s' href="javascript:void(0)" onclick="doSearch(this,'s')">S</a> | 
               <a rel='t' href="javascript:void(0)" onclick="doSearch(this,'t')">T</a> | 
               <a rel='u' href="javascript:void(0)" onclick="doSearch(this,'u')">U</a> | 
               <a rel='v' href="javascript:void(0)" onclick="doSearch(this,'v')">V</a> | 
               <a rel='w' href="javascript:void(0)" onclick="doSearch(this,'w')">W</a> | 
               <a rel='x' href="javascript:void(0)" onclick="doSearch(this,'x')">X</a> | 
               <a rel='y' href="javascript:void(0)" onclick="doSearch(this,'y')">Y</a> | 
               <a rel='z' href="javascript:void(0)" onclick="doSearch(this,'z')">Z</a> |
                <a rel='' href="javascript:void(0)" onclick="doSearch(this,'')">All</a> 
            </p>
            <table id="table">
	            <thead>
	            <tr>
		            <th><input type="checkbox" class="noborder" onclick="doCheckAll(this)"/></th>
		            <th>Họ tên</th>
		            <th>Email</th>
		            <th>Số điện thoại</th>
                    <th>Thông tin cá nhân</th>
                    <th width="100px">IsActive</th>
	            </tr>
	            </thead>
	            <tbody>
                <asp:Repeater ID="repUser" runat="server"  onitemcommand="repUser_ItemCommand" 
                onitemdatabound="repUser_ItemDataBound">
                <ItemTemplate>
                <tr>
		            <td class="table_check">
                        <input type="checkbox" id='<%# Eval("id") %>' group='check'/>
                    </td>
		            <td class="table_title">
                        <%# Eval("hoTen")%>
                    </td>		        
		            <td><%# Eval("email")%></td>
                    <td><b>Di động: </b><%# Eval("dtdd")%><br />
                        <b>Cố định: </b><%# Eval("dtcd")%>
                    </td>
                    <td><b>Năm sinh : </b><%# Eval("namSinh")%><br />
                        <b>Giới tính: </b><%# Eval("gioiTinh")%>
                    </td>
		            <td align="center">                    
                        <asp:LinkButton ID="lnkActive" runat="server" CommandName="yes" CommandArgument='<%# Eval("id") %>'>Yes</asp:LinkButton> |                
                        <asp:LinkButton ID="lnkUnActive" runat="server" CommandName="no" CommandArgument='<%# Eval("id") %>'>No</asp:LinkButton>
                        <asp:HiddenField ID="hidIsActive" runat="server" Value='<%# Eval("isActive") %>' />
                    </td>
	            </tr>
                </ItemTemplate>
                </asp:Repeater>	        
	            </tbody>
            </table>
	          <div class="page" style="text-align:center;margin:15px 0px">
                <asp:Label ID="pagerbot" CssClass="pager" runat="server" Text=""></asp:Label>
            </div>
            <asp:HiddenField ID="hidKeyDel" runat="server" /> 
            <asp:HiddenField ID="hidChar" runat="server" /> 
        </div>
    </div>
    <asp:Button ID="btnSearch" runat="server" Text="sa" onclick="btnSearch_Click" style="display:none" />
</div>
</asp:Content>

